<template>
  <div>
    <p>Parent---{{ name }}</p>
    <button @click="change">改子组件中渲染的值</button>
    <hr />
    <Child ref="childRef" />
  </div>
</template>

<script>
import Child from './13-Child.vue'
export default {
  data () {
    return {
      name: 'zhangsan'
    }
  },
  components: {
    Child
  },
  methods: {
    change () {
      console.log(this.$refs.childRef)
      this.$refs.childRef.count = 200
      this.$refs.childRef.clickMe()
    }
  }
}
</script>
